<template>
  <div>

       <mc-jd-header :mc-allow-query="true" @search="search" :data.sync="dataMap" ref="header"></mc-jd-header>
       <el-button @click="print">打印</el-button>
       <el-button @click="change">改变</el-button>
  </div>
</template>

<script>
import McQuery from "./components/McQuery";
import McJdHeader from "./components/bus/McJdHeader.vue";
export default {
    data(){
      return {
        dataMap:{
          link:[{href:"a",title:"酒店预定"},{href:"b",title:"餐厅预定"},{href:"c",title:"客房预定"}],
          keyword:{url:"/magical_lowcode/openapi/b9a3fa63ae2541359e705d088e80108b/getKeyword"},
          user:{infoUrl:"/magical_lowcode/openapi/b9a3fa63ae2541359e705d088e80108b/user/get",
            "loginUrl":"/magical_lowcode/openapi/b9a3fa63ae2541359e705d088e80108b/user/login",
            "logoutUrl":"/magical_lowcode/openapi/b9a3fa63ae2541359e705d088e80108b/user/logout",
            "registerUrl":"http://www.baidu.com"
          }
        }
      }
    },
    components:{
      McJdHeader,
      McQuery,
    },
  mounted(){
        setTimeout(()=>{
//          this.$nextTick(()=>{
//            this.$refs.query.set([
//              {title:"行业",name:"hy",value:null,condition:[{key:"",label:"全部",check:true},{key:"1",label:"电商"},{key:"2",label:"水产"}]},
//              {title:"状态",name:"status",value:null,condition:[{key:"",label:"全部",check:true},{key:"a",label:"正常"},{key:"b",label:"异常"}]},
//            ])

            this.list = [
              {title:"行业",name:"hy",value:null,condition:[{key:"",label:"全部",check:true},{key:"1",label:"电商"},{key:"2",label:"水产"}]},
              {title:"状态",name:"status",value:null,condition:[{key:"",label:"全部",check:true},{key:"a",label:"正常"},{key:"b",label:"异常"}]},
            ]
//          })
          this.$refs.header.focusLink("酒店预定")

        },2000)
  },
    methods:{
      search(p){
        console.log(p)
      },
        print(){
            console.log(this.form)
        },
        change(v){
           console.log(v)
        }
    }
}
</script>

<style>

</style>
